package com.blb.zycommunity.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.blb.zycommunity.entity.SysPost;
import com.blb.zycommunity.mapper.SysPostMapper;
import com.blb.zycommunity.service.ISysPostService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 岗位信息表 服务实现类
 * </p>
 *
 * @author chenheng
 * @since 2023-11-20
 */
@Service
public class SysPostServiceImpl extends ServiceImpl<SysPostMapper, SysPost> implements ISysPostService {

    @Autowired
    private SysPostMapper postMapper;
    @Override
    public List<SysPost> findAllPosts() {
        return postMapper.selectAllPosts();
    }

    @Override
    public IPage<SysPost> findPostPage(Long current, Long size, String postCode, String postName, String status) {
        return postMapper.selectPostPage(new Page<>(current,size),postCode,postName,status);
    }
}
